import router from './router/index'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'


NProgress.configure({
  showSpinner: false
})

const whiteList = ['/Login']

router.beforeEach((to, from, next) => {
  // to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
  NProgress.start()
  if (!to.meta.title) {
    next('/404')

  } else {
  
    next()
  }
})

router.afterEach(() => {
  NProgress.done()
})